<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" charset="utf-8">
		
			function l(s){
				console.log(s)
			}
			
			//1.获取浏览器的可视窗口尺寸
			var w=window.innerWidth
			var h=window.innerHeight
			console.log(w)
			console.log(h)
			
			//2.三种弹出层
				//提示框
			window.alert('提示框')
			
				//询问框
			var res=window.confirm('确定吗')//点击确定返回true，否则返回false
			l(res)
				//输入框
			var x=window.prompt()//返回值是输入框的内容
			l(x)
			
			

		</script>
	</head>
	<body>
			<!-- 开启和关闭标签页 -->
			<button type="button" id="on">打开</button>
			<button type="button" id="off">关闭</button>
			
			<script type="text/javascript">
				//3.开启和关闭标签页
				on.onclick=function(){
					window.open('https://www.baidu.com/?tn=62095104_44_oem_dg')
				}
				off.onclick=function(){
					window.close()//关闭的是当前标签页
				}
			</script>
	</body>
</html>
